package com.qf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author sunyamei
 * @version V1.0
 * @Project springmvc_Demo
 * @Package com.qf.controller
 * @Description:
 * @Date 2022/7/13 14:29
 *      1:path或者value是指定映射路径的
 *      2:method:指定该方法的请求方式  默认get请求
 *          扩展:@GetMapping   相当于requestMapping注解的method属性值是get***
 *              @POSTMapping   相当于RequestMapping注解的method属性值是post ***
 *     3:其他属性params  :params 指定参数请求规则 headers请求请求头规则
 */
@Controller
@RequestMapping("/Hello")
public class HelloController {
//    @RequestMapping(value = "/sayHello",method = RequestMethod.GET)
    @RequestMapping("/sayHello")
    public String sayHello() {
        System.out.println("hello springmvc....");
        //页面转发
        return "success";
    }
}